package com.boot.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
//读取指定的properties配置文件
@PropertySource("classpath:system.properties")
public class SystemConfig {

    //${userName}获取到了操作系统登录名称
    @Value("${uname}")
    String userName;

    @Value("${pwd}")
    String password;

    @Override
    public String toString() {
        return "SystemConfig{" +
                "userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
